<?php

class Flexical_Service_CAO_Factory
{
	public function get_cao( $type = 'zend' )
	{
		$cao = null;

		switch ( $type )
		{
			case 'zend':
				require_once( 'flexical/service/cao-zend.php' );
				$cao = new Flexical_Service_CAO_Zend();
				break;

			case 'simplepie':
				require_once( 'flexical/service/cao-simplepie.php' );
				$cao = new Flexical_Service_CAO_SimplePie();
				break;

			case 'hybrid':
				require_once( 'flexical/service/cao-hybrid.php' );
				$cao = new Flexical_Service_CAO_Hybrid();
				break;
		}

		return $cao;
	}
}

?>
